<?php
namespace app\markdown\event;

use think\Controller;

class Admin extends Controller
{
	
    public function _initialize()
    {
        parent::_initialize();
    }

	public function index()
    {
        // 当前应用信息
        DcLoadConfig(APP_PATH.'markdown/info.php', 'apply');
        // 比较升级条件
        if(DcConfig('common.site_applys.markdown.version') != config('apply.version')){
            controller('markdown/Sql','event')->upgrade();
            $this->success('已将此插件升级至最新版','apply/index');
        }
        $this->error('此插件不需要后台管理', 'apply/index');
	}
}